<template>
	<view class="main" :style="'top:'+(-demo.height-demo.top-10)+'px'">
		<view :style="'padding-top:'+(demo.height+demo.top+10)+'px'">
			<head1 class="nav_top"
				:style="'height:' +  demo.height + 'px;' + 'padding-top:' + demo.top + 'px;padding-bottom:10px'"
				:nav="title">
			</head1>
		</view>
		<view class="noReal_main">
			<view>
				<image :src="backUrl" mode=""></image>
				<view class="btn" @click="nowReal">
					我要实名
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import head1 from '../head/head.vue'
	export default {
		components: {
			head1
		},
		data() {
			return {
				title: '证书动态',
				demo: {
					top: '',
					height: ''
				},
				labelList: {
					currentPage: '1',
					pageSize: '10',
					column: "6e4bbef7-4cfe-11ec-9573-5254003b9aa7"
				},
				backUrl:''
			}
		},
		created() {
			const demo = uni.getMenuButtonBoundingClientRect()
			this.demo.top = demo.top
			this.demo.height = demo.height
			this.getNewList(this.labelList)
		},
		methods: {
			test() {
				this.$forceUpdate()
			
			},
			// 新闻列表
			getNewList(newLabel) {
				this.$myResquest.getNewsList(newLabel).then(res => {
					if (res.data.code == 200) {
						for(let i=0;i<res.data.data.length;i++){
							if(res.data.data[i].title=='证书动态'){
								this.backUrl='https://www.chuanjianbao.com/'+res.data.data[i].banner
							}
						}
					}
				})
			},
			nowReal() {
				uni.navigateTo({
					url: './nowReal?title=证书动态'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main {
		position: fixed;
		top: 0;
		background: #5cd1ce;
		z-index: 999;
		height: 100%;
		width: 100%;

		.nav_top {
			position: relative;
			background: #ffffff;
			display: flex;
			align-items: center;
			justify-content: center;
			width: 100%;
			min-width: 750rpx;
		}

		.noReal_main {
			position: absolute;
			width: 100%;
			height: 100%;
			background: #5cd1ce;
		
			view {
				position: relative;
				height: 100%;
				position: fixed;
				top: 66rpx;
				left: 0;
				width: 100%;
		
				image {
					width: 100%;
					height: 100%;
				}
		
				.btn {
					position: absolute;
					z-index: 9999;
					left: 50%;
					top: 80%;
					width: 486rpx;
					height: 83rpx;
					line-height: 83rpx;
					background: #ffffff;
					border-radius: 30rpx;
					font-size: 40rpx;
					font-family: Adobe Heiti Std R, Adobe Heiti Std R-R;
					font-weight: bold;
					text-align: center;
					color: #49b3af;
					line-height: 83rpx;
					transform: translateX(-50%);
				}
			}
		}


	}
</style>
